package semana2.bucles.ejercicio08;

import java.util.Random;

public class Ej08 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		int n1 = (new Random().nextInt(50) + 1);
		int n2 = (new Random().nextInt(50) + 1);
		int mayor;
		int menor;

		if (n1 > n2) {
			mayor = n1;
			menor = n2;
			System.out.println("Menor: " + menor);
			System.out.println("Mayor: " + mayor);
		} else {
			mayor = n2;
			menor = n1;
			System.out.println("Menor: " + menor);
			System.out.println("Mayor: " + mayor);
		}
		System.out.println("Estos son los numeros pares: ");
		for (int i = menor; menor <= mayor; menor++) {
			
			if (menor % 2 == 0) {
				System.out.print(menor+" ");
			}
		}
	}

}
